package com.iraeta.service.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.iraeta.entity.Role;

import java.util.List;

public interface IRoleService extends IService<Role> {
    public void addRole(Role role);
    public List<Role> getRoleByName(String roleName);

    /*userRole相关 user设置role*/
    public List<Role> listAllRole();
    public List<Role> listRoleByUserId(int userId);

    /*userRole相关， role设置user*/
    public void saveUserRole(int roleId, List<Integer> userList);

    /*role permission相关*/
    public List<Integer> listRolePermission(int roleId);
    public void saveRolePermission(int roleId, List<Integer> permissionList);
}
